<?php

 $name = 'mazhonghua';

 echo $name ;
 echo "<br />";

 var_dump($name);
 echo "<br />";

 $list = array('name' =>'mazhonghua' ,'id' =>123456,'age' =>20 );
 var_dump($list);
 echo "<br />";

 var_dump($list['name']);
 echo "<br />";

//表达式练习
 $a = 3;
 $b = 2;
 $c = $a + $b;

 echo $c;
 echo "<br />";

 $a = '';
 $b = 0;

 echo ($a==$b);
 echo "<br />";

 echo($a===$b);
 echo "<br />";

 var_dump($a===$b);
 echo "<br />";

 function p($str='')
 {
    echo "<pre>" . $str ."</pre>";//'.'：连接字符串

 }

 p($c);
 p($name);//自动换行

//流程控制
 if($b>4){
    p('比4大');
 }
 else{
    p('比4小');
 }

//for循环
 for ($i=0 ;$i <100 ; $i++) { 
     p($i);
 }

?>
